<!DOCTYPE html>
<html>
<head>
    <meta charset='UTF-8'>
    <title>Document</title>
</head>
<body>
    <div id="app">
        <common-btn></common-btn>
        <common-btn></common-btn>
        <common-btn></common-btn>
    </div>
</body>
<script src="../vue.js"></script>
<script>
    Vue.component('common-btn',{
        template:`
            <button v-on:click='num +=1'>揍了我{{num}}次</button>
        `,
        data:function(){
            return{
                num:0
            }
        }
    }),
    new Vue({
        el:"#app"
    })
</script>
</html>